package service.impl;

import domain.Product;
import dao.ProductDao;
import dao.impl.ProductDaoImpl;
import service.ProductService;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author admin
 * @Date 2019/2/25 11:16
 */
public class ProductServiceImpl implements ProductService {
    ProductDao dao=new ProductDaoImpl();
    @Override
    public List<Product> findAll() throws SQLException {
        return dao.findAll();
    }

    @Override
    public void delete(String pid) {
        dao.delete(pid);
    }

    @Override
    public void add(Product product) throws SQLException {
        dao.add(product);
    }

}
